package com.ruoyi.record.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.record.mapper.ErpFinanceRecordMapper;
import com.ruoyi.record.domain.ErpFinanceRecord;
import com.ruoyi.record.service.IErpFinanceRecordService;

/**
 * 收支记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-07-21
 */
@Service
public class ErpFinanceRecordServiceImpl implements IErpFinanceRecordService 
{
    @Autowired
    private ErpFinanceRecordMapper erpFinanceRecordMapper;

    /**
     * 查询收支记录
     * 
     * @param recordId 收支记录主键
     * @return 收支记录
     */
    @Override
    public ErpFinanceRecord selectErpFinanceRecordByRecordId(Long recordId)
    {
        return erpFinanceRecordMapper.selectErpFinanceRecordByRecordId(recordId);
    }

    /**
     * 查询收支记录列表
     * 
     * @param erpFinanceRecord 收支记录
     * @return 收支记录
     */
    @Override
    public List<ErpFinanceRecord> selectErpFinanceRecordList(ErpFinanceRecord erpFinanceRecord)
    {
        return erpFinanceRecordMapper.selectErpFinanceRecordList(erpFinanceRecord);
    }

    /**
     * 新增收支记录
     * 
     * @param erpFinanceRecord 收支记录
     * @return 结果
     */
    @Override
    public int insertErpFinanceRecord(ErpFinanceRecord erpFinanceRecord)
    {
        return erpFinanceRecordMapper.insertErpFinanceRecord(erpFinanceRecord);
    }

    /**
     * 修改收支记录
     * 
     * @param erpFinanceRecord 收支记录
     * @return 结果
     */
    @Override
    public int updateErpFinanceRecord(ErpFinanceRecord erpFinanceRecord)
    {
        return erpFinanceRecordMapper.updateErpFinanceRecord(erpFinanceRecord);
    }

    /**
     * 批量删除收支记录
     * 
     * @param recordIds 需要删除的收支记录主键
     * @return 结果
     */
    @Override
    public int deleteErpFinanceRecordByRecordIds(Long[] recordIds)
    {
        return erpFinanceRecordMapper.deleteErpFinanceRecordByRecordIds(recordIds);
    }

    /**
     * 删除收支记录信息
     * 
     * @param recordId 收支记录主键
     * @return 结果
     */
    @Override
    public int deleteErpFinanceRecordByRecordId(Long recordId)
    {
        return erpFinanceRecordMapper.deleteErpFinanceRecordByRecordId(recordId);
    }
}
